package com.binance.assetservice.api;

import java.util.List;

import com.binance.assetservice.vo.response.asset.SymbolResponse;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.binance.assetservice.annotation.Source;
import com.binance.assetservice.vo.request.GetAssetByCodeRequest;
import com.binance.assetservice.vo.request.asset.UserAssetDividendRequest;
import com.binance.assetservice.vo.response.PagingResult;
import com.binance.assetservice.vo.response.asset.AssetResponse;
import com.binance.assetservice.vo.response.asset.GetAssetPicResponse;
import com.binance.assetservice.vo.response.asset.UserAssetDividendResponse;
import com.binance.master.configs.FeignConfig;
import com.binance.master.constant.Constant;
import com.binance.master.models.APIRequest;
import com.binance.master.models.APIRequest.VoidBody;
import com.binance.master.models.APIResponse;

import io.swagger.annotations.Api;

@Api
@FeignClient(name = Constant.ASSET_SERVICE, configuration = FeignConfig.class)
public interface IAssetApi {

    @PostMapping(value = "/asset/getAssetByCode", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @Source(value = "PNK", originalUrl = "/assetWithdraw/getAsset.html")
    public APIResponse<AssetResponse> getAssetByCode(@RequestBody APIRequest<GetAssetByCodeRequest> request)
            throws Exception;

    @PostMapping(value = "/asset/getSymbolByAsset", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @Source(value = "PNK", originalUrl = "/asset/getSymbolByAsset.html")
    public APIResponse<List<SymbolResponse>> getSymbolByAsset(@RequestBody APIRequest<String> request)
            throws Exception;

    @PostMapping(value = "/asset/userAssetDividend", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @Source(value = "PNK", originalUrl = "/asset/userAssetDividend.html")
    public APIResponse<PagingResult<UserAssetDividendResponse>> userAssetDividend(
            @RequestBody APIRequest<UserAssetDividendRequest> request) throws Exception;

    @PostMapping(value = "/assetWithdraw/getAllAsset", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @Source(value = "PNK", originalUrl = "/assetWithdraw/getAllAsset.html")
    public APIResponse<List<AssetResponse>> getAllAsset(@RequestBody APIRequest<VoidBody> request) throws Exception;

    @PostMapping(value = "/dictionary/getAssetPic", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @Source(value = "PNK", originalUrl = "/dictionary/getAssetPic.html")
    public APIResponse<List<GetAssetPicResponse>> getAssetPic(@RequestBody APIRequest<VoidBody> request)
            throws Exception;



}
